const arr=Array.of(1)
console.log(arr);

const arr1=Array.from('abc')
console.log(arr1);

/* 数组去重 */
var arr2=[1,2,3,3]

var set=new Set(arr2)
// console.log(set);

console.log(Array.from(set)); 

var map1=new Map([['name','yjw'],['name','yz']])
console.log(map1);

/* 统计每个字母的数量 */
var str='tygfghfvyj'

var map=new Map()
for (let index in str) {
    const item=str[index]
    if (map.has(item)) {
        map.set(item,map.get(item)+1)
    } else {
        map.set(item,1)
    }
}
    
console.log(map);
